package com.easy.config;

import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

public class ImgStaticPathConfig implements WebMvcConfigurer {
    public static final String STATIC_PATH = "/img/";
    public static final String STATIC_DIR = "D:\\Desktop\\mycode\\java\\myWarehouse\\src\\main\\resources\\images\\";
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry){
        registry.addResourceHandler(STATIC_PATH+"**").addResourceLocations("file:"+STATIC_DIR);
    }
}
